package com.feixiu.controller;

import com.feixiu.pojo.Staff;
import com.feixiu.service.StaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/staff")
public class StaffCon {
    @Autowired
    private StaffService staffService;
    @RequestMapping("/getone")
    @ResponseBody
    public Staff getStaffById(String account){
        return staffService.getStuffById(account);
    }
    @RequestMapping("/is")
    @ResponseBody
    public String isStaff(String account){
         String flag="false";
         if(staffService.isStuff(account)){
             flag="true";
         }
         return flag;
    }
}
